package cn.laixueit.service;

import cn.laixueit.base.R;
import cn.laixueit.pojo.Book;
import cn.laixueit.pojo.BookChapter;
import cn.laixueit.pojo.BookChapterContent;
import cn.laixueit.vo.BookVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.yulichang.base.MPJBaseService;

/**
 *
 */
public interface BookService extends MPJBaseService<Book> {

    R listPage(Page<Book> pageInfo, BookVo bookvo);

    void saveOrUpdateBook(Book book);

    BookVo getRowAndChapter(String id, String chapterId);

    void saveAndChapter(Book book);

    BookChapterContent getContent(String id);

    void saveContent(BookChapterContent chapterContent);

    void removeChapterAndContent(String id);

    BookChapter saveChapter(BookChapter chapter);

    Book listBookAndChaptersAndContents(String id);

    R listBookAndOneChapters(BookVo bookvo);

    R chapterList(Page<BookChapter> chapterPage, BookChapter chapter);

    R chapterContent(String id);
}
